<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css">
    <style>
        .account {
            width: 600px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
<div class="account">

    <h1 style="text-align: center;">注册</h1>
<form>
  {% for field in form %}
  {% if field.name == 'code' %}
  <div class="form-group">
    <label for="{{ field.id_for_lable }}">{{ field.label }}</label>
      <div class="clearfix">  {# clearfix 给这个div浮动 #}
          <div class="col-md-6" style="padding-left: 0">{{ field }}</div> {# coL-md-6 栅格系统 #}
          <div class="col-md-6"><input type="button" class="btn btn-default" value="点击获取验证码"></div>
      </div>
  </div>
      {% else %}
        <div class="form-group">
    <label for="{{ field.id_for_lable }}">{{ field.label }}</label>
    {{ field }}
  </div>
      {% endif %}
          {% endfor %}
  <button type="submit" class="btn btn-primary">注册</button>
</form>



</div>

</body>
</html>